﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OpenMUD.Kernel.Interface.Client;
using Open_MUD.Kernel.Interface.Client;
using Open_MUD.Mudlib.lib;

namespace Open_MUD.Mudlib.Cmds
{
    class Mirar : CommandBase
    {
        public override void executeCMD(string cmd)
        {
           if ( cmd.Equals(cmdkey) )
           {
            if (cliente.PJ.Entorno != null)
                cliente.render(cliente.PJ.Entorno.Short);
           }else
           {
              MUDObject obj = cliente.PJ.buscar(args);
              if ( obj != null )
                 cliente.render(obj.Long);
              else{
                 obj = cliente.PJ.Entorno.buscar(args);
                 if ( obj != null )
                    cliente.render(obj.Long);
              }   
           }
        }

        public Mirar(Cliente c)
            : base(c, "mirar", 0)
        {
            ignoreGlobalCD = true;
        }
    }
    
}
